// 翻译
var language = localStorage.getItem('language') || 'zh-CN'
import qiBao_en from '@/assets/languages/en'
import qiBao_zhcn from '@/assets/languages/zh-CN'
var frameLocale = language === 'en-US' ? qiBao_en : qiBao_zhcn
export function $tra(attr, defaultValue) {
  let value = defaultValue
  try {
    const matchValue = attr.split('.').reduce((frameLocale, key) => frameLocale[key], frameLocale)
    value = typeof matchValue !== 'undefined' ? matchValue : value
  } catch (e) { }
  return value
}